
# 这个镜像包含了open5gs编译的必要库

FROM ubuntu:18.04
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" > /etc/apt/sources.list
# RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list
# RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list
# RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list
# RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list
# RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list

RUN apt update && apt install -y python3-pip

RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple


# RUN pip3 install pymongo  requests
# RUN  apt install -y python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev meson mongodb python3 git libtalloc-dev meson
# RUN apt install -y libmysqlclient-dev mysql-client

# 用来测试得工具包
RUN apt install -y iproute2 netbase pkg-config ca-certificates
RUN apt install -y curl iptables net-tools vim iputils-ping sudo git

# 安装ssh
RUN apt install -y ssh && echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
RUN echo "root:123123" | chpasswd
RUN echo 'sshd: ALL' >> /etc/hosts.allow
# RUN sudo /etc/init.d/ssh start
# RUN service ssh start

# RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
# RUN apt install -y nodejs
RUN apt install -y openjdk-8-jdk
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
ENV JRE_HOME=${JAVA_HOME}/jre
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH=${JAVA_HOME}/bin:$PATH

WORKDIR /home/
RUN wget https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
RUN tar xzvf apache-maven-3.8.6-bin.tar.gz
ENV PATH=/home/apache-maven-3.8.6/bin:$PATH

EXPOSE 22



CMD ["/bin/bash"]
# RUN git clone https://gitee.com/cy_bupt/open5gs-2.4.4.git
